<div class="poll">
<h2>{$poll.name}</h2>
{if $poll.type == 1}
{$formStart}
{/if}
<table>
    {section name=option loop=$options}
    {if $poll.type == 0}
    <tr>
        <td>
            {if $canVote}<a href="{$options[option].vote}">{/if}<small>{$smarty.section.option.index+1}.</small>
            {$options[option].name}{if $canVote}</a>{/if}
            <small>({$options[option].percent|round:2} %)</small>
        </td>
        <td>
            <table>
                <tr>
                    <td width="{$options[option].percent}%">&nbsp;</td>
                    <td width="{math equation='100-x' x=$options[option].percent}%">&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
    {else}
    <tr>
        <td><small>{$smarty.section.option.index+1}.</small> {$options[option].name} <small>({$options[option].percent|round:2} %)</small></td>
        <td>
            <table>
                <tr>
                    <td width="{$options[option].percent}%">&nbsp;</td>
                    <td width="{math equation='100-x' x=$options[option].percent}%">&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
    {if $canVote}
    <tr>
        <td colspan="2" style="padding-left: 25px;">
            {section name=vote loop=$poll.maxVotes+1 start=$poll.minVotes}
            <label><input name="option[{$options[option].id}]" value="{$smarty.section.vote.index}" type="radio"{if $smarty.section.vote.index == $poll.defaultVotes} checked=""{/if} /> {$smarty.section.vote.index}</label>
            {/section}
        </td>
    </tr>
    {/if}
    {/if}
    {/section}
</table>
{if $poll.type == 1}
<input type="hidden" name="type" value="1" />
{if $canVote}<input type="submit" value="{$vote}" />{/if}
{/if}
<p>{$totalVotes} {$total}</p>
</div>